<%@page contentType="text/html" pageEncoding="UTF-8" import="com.pub.database.*,java.util.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
        <h1>
            <%
            System.out.println("test");
                QueryBean qb = null;
                ArrayList arlData = null;
                try{
                    System.out.println("1");
                    qb = new QueryBean("MYSQL_GM",true,"utf-8","jdbc");
                    System.out.println("2");
                    arlData = qb.querySQL("select * from webdb.school_ext where emp_name='林志銘'");

                    out.println("測試成功<br/>");

                    for(Object o : arlData){
                        for(Object so : (ArrayList)o){
                            out.println(so.toString());
                            out.println("<br/>");
                        }
                    }

                    
                }
                catch(Exception e){
                    out.println("測試失敗");
                    e.printStackTrace();
                }
                finally{
                    if(qb!=null){
                        qb.close();
                        qb = null;
                    }
                }
            %>
        </h1>
    </body>
</html>

